home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
3_11.lha
/
3_11
/
3_11dtst.c
< prev
next >
Wrap
Text File
|
1993-08-08
|
994b
|
48 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
include <stdio.h>
include <setjmp.h>
ifdef TSTD
include "3_11d.c"
endif
ifdef TSTE
include "3_11e.c"
endif
nt x[] = {
-2147483648, 0, 10, 100, 2147483647,
-0, -10, -100, -2147483647,
0x0, 0x10, 0x100, 0x2147483647, 0x2147483648, 0x123abc,
-0x0, -0x10, -0x100, -0x2147483647, -0x2147483648, -0x123abc,
0xFfFfFfFf, 0x7fffffff, 0x8000000,
-0xFfFfFfFf, -0x7fffffff, -0x8000000,
00, 010, 0100, 017777777777, 037777777777, 020000000000,
-00,-010, -0100, -017777777777, -037777777777, -020000000000,
017777777776, -017777777776,
1515
;
mp_buf jmpenv;
oid error(const char *x, ...)
printf("error: %s\n", x);
longjmp(jmpenv, 1);
ain()
char buf[100];
for (int *xp = x; *xp != 1515; xp++)
if (setjmp(jmpenv))
; // error occurred
else
{
itoa(buf, sizeof(buf), *xp);
printf("*xp='%d', buf='%s'\n", *xp, buf);
}
return 0;